DL_CFLAGS := $(shell sdl-config --cflags)
SDL_LDFLAGS := $(shell sdl-config --static-libs)
SDL_DRAW_LDFLAGS := /usr/local/lib/libSDL_draw.a
CFLAGS = -Wall -O2 $(SDL_CFLAGS)
LDFLAGS = $(SDL_LDFLAGS) $(SDL_DRAW_LDFLAGS)
CC = gcc
INSTALL = install -c
DESTDIR = /usr/local/bin

gameoflife: gameoflife.c
	$(CC)  gameoflife.c -o $@ $(LDFLAGS)

install: gameoflife
	$(INSTALL) -m 755 gameoflife $(DESTDIR)

clean: 
	\rm -f gameoflife *o

